package com.zj.fx.service;


import com.zj.fx.mapper.auto.ScanMapper;
import com.zj.fx.model.auto.Scan;
import com.zj.fx.util.SnowflakeIdWorker;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisHash;
import org.springframework.stereotype.Service;

/**
 * @author Administrator
 */
@Service
@RequiredArgsConstructor
public class ScanService {
    private  final ScanMapper scanMapper;

    public int insertScan(Scan scan) {
        //添加雪花主键id
        scan.setId(SnowflakeIdWorker.getUUID());
        return scanMapper.insertScan(scan);
    }

    public long queryScan(Scan scan) {
        return scanMapper.queryScan(scan);
    }
}
